<?php   // $Id: fact_change_payement.php 207 2008-06-06 12:26:53Z pcoustillas $ ?>
<?php
/*
Licensed under the terms of the GNU  General Public License:http://www.opensource.org/licenses/gpl-license.php
File Authors:Pierre Coustillas
*/
require_once("include/verif.php");
require_once("include/config/common.php");
require_once("include/config/var.php");
//require_once("include/language/$lang.php");


$num_fact=isset($_POST['num_fact'])?$_POST['num_fact']:"";
$payement=isset($_POST['payement'])?$_POST['payement']:"";

//on met à jour les bons qui utilisent cette facture qui vient de changer de numéro 
$sql = "UPDATE ${tblpref}facture SET payement='$payement' WHERE num=$num_fact";
mysql_query($sql) or die("Erreur changement payement facture <br/>$sql<br/>" . mysql_error());


header("location: fact_lister.php?num_fact=$num_fact");


?>
